package com.zoe.onelink.common.enumeration.bean;

import com.zoe.onelink.common.enumeration.ExceptionCode;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Setter
@NoArgsConstructor
@AllArgsConstructor
public class ExceptionCodeBean implements ExceptionCode {

    private static final long serialVersionUID = 7510711237390265468L;

    private String code;
    private String messageKey;

    public ExceptionCodeBean(ExceptionCode exceptionCode) {
        if (exceptionCode == null) {
            return;
        }
        this.code = exceptionCode.getCode();
        this.messageKey = exceptionCode.getMessageKey();
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMessageKey() {
        return this.messageKey;
    }

}
